#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int number1(int num)
{
    int cont = 0;
    while (num) {
        num = num & (num - 1);
        cont++;
    }
    return cont;
}
int main()
{
    int num = 0;
    scanf("%d", &num);
    printf("%d", number1(num));
    return 0;
}